package cn.kgc.tangcco.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/10/30 9:23
 * @NotBlank 字符串不能为空
 * @NotNull  基本数据类型对象类型的对象不能为空
 * @NotEmpty 集合不能为空
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@Accessors(chain = true)
@ApiModel
public class Student implements Serializable {
    private static final long serialVersionUID = -7213062077556922445L;
    /**
     * 学生编号
     */
    @ApiModelProperty(value = "学生编号")
    private Integer id;

    /**
     * 学生唯一标志
     */
    @ApiModelProperty(value = "学生唯一标志")
    private String uuid;

    /**
     * 学生曾用名
     */
    @ApiModelProperty(value = "学生曾用名")
    @NotBlank(message = "{firstName}")
    private String firstName;

    /**
     * 学生现用名
     */
    @ApiModelProperty(value = "学生现用名")
    @NotBlank(message = "{lastName}")
    private String lastName;

    /**
     * 学生身份证
     */
    @ApiModelProperty(value = "学生身份证")
    @NotBlank(message = "{idCard}")
    private String idCard;

    /**
     * 学生手机号
     */
    @ApiModelProperty(value = "学生手机号")
    @NotBlank(message = "{mobile}")
    private String mobile;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @NotBlank(message = "{authText}")
    private String authText;

    /**
     * 学生所在班级编号
     */
    @ApiModelProperty(value = "学生所在班级编号")
    @NotNull(message = "{cid}")
    private Integer cid;

    /**
     * 学生所在班级信息
     */
    @ApiModelProperty(value = "学生所在班级信息")
    private Clazz clazz;


    public Student(String uuid, String firstName, String lastName, String idCard, String mobile, String authText, Integer cid) {
        this.uuid = uuid;
        this.firstName = firstName;
        this.lastName = lastName;
        this.idCard = idCard;
        this.mobile = mobile;
        this.authText = authText;
        this.cid = cid;
    }

    public Student(String uuid, String firstName, String lastName, String idCard, String mobile, String authText, Integer cid, Clazz clazz) {
        this.uuid = uuid;
        this.firstName = firstName;
        this.lastName = lastName;
        this.idCard = idCard;
        this.mobile = mobile;
        this.authText = authText;
        this.cid = cid;
        this.clazz = clazz;
    }
}
